function main()
{
	var documentType=json.get("cm_title");
	if (documentType=="fas:Denuncia") {
		model.type = "Denuncia";
	}
	else if (documentType=="cm:content") {
		model.type = "Contenuto";
		documentType= "cmis:document";
	}
	
	
	var queryParam = {
		language: "cmis-alfresco",
		query: "select * from " + documentType
	};
	
	var results = search.query(queryParam);
	model.number = results.length;
}

main();